
//
//  InputViewController.m
//  帮惠管理员
//
//  Created by reew on 2017/10/18.
//  Copyright © 2017年 reew. All rights reserved.
//

#import "InputViewController.h"
#import "AddGoodsTableViewController.h"
@interface InputViewController ()<UITextViewDelegate>

@end

@implementation InputViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupNav];
}
- (void)setupNav{
    UIBarButtonItem *rightItem= [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStylePlain target:self action:@selector(save)];
    //    rightItem.tintColor = [UIColor blackColor];
    self.navigationItem.rightBarButtonItem = rightItem;
    self.navigationController.navigationBar.tintColor = [UIColor blackColor];
}
- (void)save{
    NSUInteger index = self.navigationController.viewControllers.count-2;
    AddGoodsTableViewController *vc = self.navigationController.viewControllers[index];
    [vc setValue:_textView.text forKey:_infoStr];
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
